package cn.cls;

import java.util.Map;
import java.util.WeakHashMap;

public class testWeakMap {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Map map=new WeakHashMap();
		for(int i=0;i<10;i++){
			map.put(Integer.valueOf(i), Integer.valueOf(i));
		}
		map.put(null, null);
		try {
			Thread.currentThread().sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.gc();
		System.out.println(map.entrySet());
		System.gc();
	}

}
